home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / utils / bibindex / Makefile < prev    next >
Makefile  |  1993-05-31  |  5KB  |  190 lines

  1. #=======================================================================
  2. # Makefile for bibindex and biblook.
  3. #
  4. # These programs are written in ISO/ANSI Standard C.  They must be
  5. # compiled with a Standard C compiler, or with a C++ compiler.
  6. #
  7. # Current target list:
  8. #    all             make bibindex and biblook
  9. #    bibindex.txt         ascii text file from UNIX man pages
  10. #    bibindex         make indexing program
  11. #    bibindex.tar        UNIX tar archive file for bibindex
  12. #                distribution
  13. #    bibindex.tar.z        compressed UNIX tar archive file for bibindex
  14. #    bibindex.uue        uuencoded bibindex.tar.z archive
  15. #    bibindex.zip        InfoZip archive file for bibindex
  16. #                distribution
  17. #    bibindex.zoo        zoo archive file for bibindex distribution
  18. #    bibindex.tar-lst    listing of UNIX tar archive file
  19. #    bibindex.zip-lst    listing of InfoZip archive file
  20. #    bibindex.zoo-lst    listing of zoo archive file
  21. #    biblook.txt         ascii text file from UNIX man pages
  22. #    biblook         make lookup program
  23. #    clean             remove all recreatable files, except
  24. #                executables
  25. #    clobber         remove all recreatable files
  26. #    install         install executables and manual pages
  27. #    uninstall         uninstall executables and manual pages
  28. #
  29. # [01-Jun-1993]
  30. #=======================================================================
  31.  
  32. DEST        = /usr/local
  33.  
  34. BINDIR        = $(DEST)/bin
  35.  
  36. CATDIR        = $(DEST)/man/cat1
  37.  
  38. # Compilation with a C++ compiler is preferable.  SunOS 4.1 CC cannot be
  39. # used, however, because of its erroneous function prototypes in stdlib.h
  40. # which use char* instead of void* in many places.  There is no such
  41. # problem with Sun Solaris 2.1 CC, which works fine.
  42. CC        = CC            ## some UNIX C++ compilers
  43. CC        = CC -I/usr/CC/incl    ## C++ on SunOS 4.1.1
  44. CC        = acc -Dsun        ## SunOS Standard C compiler
  45. CC        = c89 -D_POSIX_SOURCE    ## HP 9000/850 HP-UX A.08.00 D
  46. CC        = c89 -D_POSIX_SOURCE    ## IBM RS/6000 Standard C
  47. CC        = xlC            ## IBM RS/6000 C++
  48. CC        = cc            ## many UNIX systems
  49. CC        = cc $(GCCFLAGS)    ## NeXT
  50. CC        = lcc -A -A -n        ## Princeton/AT&T Standard C compiler
  51. CC        = g++ $(GCCFLAGS)    ## UNIX systems with GNU C++
  52. CC              = gcc $(GCCFLAGS)    ## GNU C
  53. CC        = g++ $(GCCFLAGS)    ## UNIX systems with GNU C++
  54. CC        = g++ $(GCCFLAGS) -Dtemplate=Template ## NeXT systems with GNU C++
  55. CC        = cc -ObjC        ## NeXT systems with Objective C
  56. CC              = gcc $(GCCFLAGS)    ## GNU C
  57.  
  58. CFLAGS        = $(OPT)        ## most cases
  59.  
  60. GCCFLAGS    = -Wall -Wshadow -Wcast-qual -Wpointer-arith \
  61.           -Wwrite-strings
  62.  
  63. COL        = col -b
  64.  
  65. COMPRESS    = compress
  66.  
  67. CP        = /bin/cp
  68.  
  69. FTPDIR        = /usr/spool/ftp/pub/tex/bib
  70.  
  71. LDFLAGS        =
  72.  
  73. # Use /usr/lib/debug/malloc.o on Sun systems for malloc debugging
  74. # with acc, gcc, or CC
  75. LIBS        = /usr/lib/debug/malloc.o
  76. LIBS        =
  77.  
  78. MANDIR        = $(DEST)/man/man1
  79.  
  80. MANEXT        = 1
  81.  
  82. NROFF        = nroff -man
  83.  
  84. # Define DEBUG_MALLOC on Sun systems for debugging memory allocation
  85. OPT        = -g -DDEBUG_MALLOC
  86. OPT        = -g
  87.  
  88. RM        = /bin/rm -f
  89.  
  90. SHELL        = /bin/sh
  91.  
  92. TAR        = tar
  93.  
  94. TARFILES    = README Makefile bibindex.c bibindex.man bibindex.txt \
  95.         biblook.c biblook.h biblook.man biblook.txt
  96.  
  97. UNZIP        = unzip
  98.  
  99. UUENCODE    = uuencode
  100.  
  101. ZIP        = zip
  102.  
  103. ZOO        = zoo
  104.  
  105. #=======================================================================
  106.  
  107. all:    bibindex biblook bibindex.txt biblook.txt
  108.  
  109. bibindex:    bibindex.o
  110.     $(CC) $(CFLAGS) -o bibindex bibindex.o $(LDFLAGS) $(LIBS)
  111.  
  112. bibindex.txt:    bibindex.man
  113.     $(NROFF) $? | $(COL) >$@
  114.  
  115. bibindex.tar:    $(TARFILES)
  116.     $(TAR) cf $@ $(TARFILES)
  117.  
  118. bibindex.tar-lst:    bibindex.tar
  119.     $(TAR) tvf $? >$@
  120.  
  121. bibindex.tar.z:    bibindex.tar
  122.     $(COMPRESS) <$? >$@
  123.  
  124. bibindex.uue:    bibindex.tar.z
  125.     $(UUENCODE) $? $? >$@
  126.  
  127. bibindex.zip:    $(TARFILES)
  128.     -$(RM) $@
  129.     $(ZIP) $@ $(TARFILES)
  130.  
  131. bibindex.zip-lst:    bibindex.zip
  132.     $(UNZIP) -v $? >$@
  133.  
  134. bibindex.zoo:    $(TARFILES)
  135.     -$(RM) $@
  136.     $(ZOO) a $@ $(TARFILES)
  137.  
  138. bibindex.zoo-lst:    bibindex.zoo
  139.     $(ZOO) v $? >$@
  140.  
  141. biblook:    biblook.o
  142.     $(CC) $(CFLAGS) -o biblook biblook.o $(LDFLAGS) $(LIBS)
  143.  
  144. biblook.txt:    biblook.man
  145.     $(NROFF) $? | $(COL) >$@
  146.  
  147. bibindex.o biblook.o: biblook.h
  148.  
  149. clean mostlyclean:
  150.     -$(RM) \#*
  151.     -$(RM) *~
  152.     -$(RM) core
  153.     -$(RM) *.o
  154.     -$(RM) bibindex.tar bibindex.tar.z bibindex.tar-lst
  155.     -$(RM) bibindex.uue
  156.     -$(RM) bibindex.zip bibindex.zip-lst
  157.     -$(RM) bibindex.zoo bibindex.zoo-lst
  158.  
  159. clobber distclean realclean reallyclean:    clean
  160.     -$(RM) biblook bibindex
  161.     -$(RM) biblook.txt bibindex.txt
  162.  
  163. install:    bibindex biblook
  164.     -$(CP) bibindex $(BINDIR)
  165.     -chmod 775 $(BINDIR)/bibindex
  166.     -$(CP) biblook $(BINDIR)
  167.     -chmod 775 $(BINDIR)/biblook
  168.     -$(CP) bibindex.man $(MANDIR)/bibindex.$(MANEXT)
  169.     -chmod 774 $(MANDIR)/bibindex.$(MANEXT)
  170.     -$(CP) biblook.man $(MANDIR)/biblook.$(MANEXT)
  171.     -chmod 774 $(MANDIR)/biblook.$(MANEXT)
  172.  
  173. install-ftp:    bibindex.tar.z bibindex.zip bibindex.zoo \
  174.         bibindex.tar-lst bibindex.zip-lst bibindex.zoo-lst
  175.     -for f in $? ; \
  176.     do \
  177.         $(CP) $$f $(FTPDIR) ; \
  178.         chmod 774 $(FTPDIR)/$$f ; \
  179.     done
  180.  
  181. uninstall:
  182.     -$(RM) $(BINDIR)/bibindex
  183.     -$(RM) $(BINDIR)/biblook
  184.     -$(RM) $(MANDIR)/bibindex.$(MANEXT)
  185.     -$(RM) $(MANDIR)/biblook.$(MANEXT)
  186.     -$(RM) $(CATDIR)/bibindex.$(MANEXT)
  187.     -$(RM) $(CATDIR)/biblook.$(MANEXT)
  188.  
  189. #=======================================================================
  190.